
import javax.swing.*;
import java.util.*;

public class main
  {
    
    public static void main(String[] args)
      {

    	//set up the frame
        mainFrame game;
        game = new mainFrame();
        game.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        game.setLocationRelativeTo(null);
        game.setVisible(true);

        game.addElement(1);
        game.addElement(2);
        game.addElement(3);
        game.addElement(4);
        
        //loop and update until the player dies
        for (;;)
            {
                try {
                    Thread.sleep(250);
                } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                GameObject.updateAll();
            }               
      }
    

  }
